Skip to content

Method: NoIdentifierException(Token, String)

1: package de.fhdw.wtf.common.exception.parser;
2:
3: import de.fhdw.wtf.common.constants.parser.ExceptionConstants;
4: import de.fhdw.wtf.common.token.Token;
5:
6: /**
7: * The {@link NoIdentifierException} will be thrown if a {@link de.fhdw.wtf.common.token.IdentifierToken} is expected,
8: * but an another Token was found.
9: *
10: */
11: public class NoIdentifierException extends AbstractParserException {
12:         
13:         /**
14:          * generated.
15:          */
16:         private static final long serialVersionUID = 1260421259295183645L;
17:         
18:         /**
19:          * Constructor of {@link NoIdentifierException}.
20:          *
21:          * @param token
22:          * token
23:          * @param message
24:          * message
25:          */
26:         protected NoIdentifierException(final Token token, final String message) {
27:                 super(token, message);
28:         }
29:         
30:         /**
31:          * Creates a {@link NoIdentifierException}-Object.
32:          *
33:          * @param token
34:          * token
35:          * @return The {@link NoIdentifierException}-Object.
36:          */
37:         public static NoIdentifierException create(final Token token) {
38:                 return new NoIdentifierException(token, ExceptionConstants.NO_IDENTIFIER_EXCEPTION_MESSAGE);
39:         }
40:         
41: }